package com.chanyachting.emall.action.companyproduct;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.chanyachting.emall.domain.Showyacht;
import com.chanyachting.emall.form.ShowyachtForm;
import com.chanyachting.emall.service.ShowyachtService;
import com.chanyachting.emall.serviceImpl.ShowyachtServiceImpl;




//创建游艇展览
public class EditShowyachtAction extends Action {

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		
		ShowyachtForm syform=(ShowyachtForm)form;
		
		Showyacht sy= null;
		try {
			ShowyachtService cpservice=new ShowyachtServiceImpl();
			
			sy = cpservice.getOneShowyachtById(syform.getId().toString());
			
		} catch (Exception e) {
			
			e.printStackTrace();
		}
		syform.setShowyacht(sy);
		
		return mapping.findForward("editShowyacht");
	}
	
	
	

}
